<?php
$this->Blocks->set('script', $this->Html->scriptBlock('
                $(document).ready(function(){
                        $(\'.jobs-expired-right-content table tr:odd, introduce-company table tr:odd\').addClass(\'odd\');
                })
'));
?>
<div class="jobs-seeker main">
        <div class="title-tab1 color-blue-bold"><?php echo __d('front', 'Hồ sơ tuyển dụng'); ?></div>
        <div class="content-tab introduce-company">
                <?php echo $this->Layout->sessionFlash(); ?>
                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tr>
                                <th class="col1 color-blue-bold"><?php echo __d('front', 'Công việc') ?></th>
                                <th class="col2 color-blue-bold"><?php echo __d('front', 'Mức lương') ?></th>
                                <th class="col3 color-blue-bold"><?php echo __d('front', 'Ngành nghề') ?></th>
                                <th class="col4 color-blue-bold"><?php echo __d('front', 'Hết hạn') ?></th>
                                <th class="color-blue-bold"><?php echo __d('front', 'Status') ?></th>
                                <th class="color-blue-bold"><?php echo __d('front', 'Delete') ?></th>                                
                        </tr>
                        <?php if (count($jobs) > 0) { ?>
                                <?php foreach ($jobs as $job) { ?>
                                        <tr>
                                                <td>                                                        
                                                        <div><?php echo $this->Html->link($job['Job']['title'], array('plugin' => 'jobs', 'controller' => 'jobs', 'action' => 'edit', $job['Job']['id'])) ?></div>
                                                        <div class="sub-title"><?php echo $this->Html->link($job['User']['name'], array('plugin' => 'jobs', 'controller' => 'jobs', 'action' => 'edit', $job['Job']['id'])) ?></div>
                                                </td>
                                                <td><?php $salary = explode("\n",Configure::read('Jobs.salary')); echo $salary[$job['Job']['salary']] ?></td>
                                                <td class="color-blue"><?php echo '<ul>' . $this->Job->implodeData(array('tag' => 'li', 'attr' => ''), $job['Job']['career_id'], Hash::combine($job, 'Career.{n}.Career.id', 'Career.{n}.Career.name')) . '</ul>' ?></td>
                                                <td><?php echo empty($job['Job']['created'])?'':date('d-m-Y',strtotime($job['Job']['created'])) ?></td>
                                                <td class="text-center">
                                                        <?php
                                                                if($job['Job']['status']==0){
                                                                        echo $this->Html->image('cross.png');
                                                                }else{
                                                                        echo $this->Html->image('tick.png');
                                                                }
                                                        ?>
                                                </td>
                                                <td>
                                                        <?php
                                                                echo $this->Form->postLink(__d('front','Delete'),array('plugin'=>'jobs','controller' => 'jobs', 'action' => 'delete', $job['Job']['id']),null,__d('front','Are you want to delete this?'));
                                                        ?>
                                                </td>                                                 
                                        </tr>
                                <?php } ?>        
                        <?php } else { ?>
                                <tr>
                                        <td colspan="4"><?php echo __d('front', 'Bạn chưa đăng công việc.') ?></td>
                                </tr>
                        <?php } ?>                                                           
                </table> 
        </div>
</div>
<div class="pacing"></div>
<?php if (count($jobs) < 10) { ?>
<div class="advertising">
                <?php $logos = $this->Job->getLogoHome(); ?>
                <?php if (count($logos) > 0): ?>
                    <?php foreach ($logos as $logo): ?>
            <a href="<?php echo $this->Html->Url($logo['Weblink']['link']) ?>"> <?php echo $this->Html->image($logo['Weblink']['logo'], array('alt' => $logo['Weblink']['title'])) ?></a>
                    <?php endforeach; ?>
                <?php endif ?>                

</div>
<div class="pacing"></div>
 <?php echo $this->element('feature-news') ?>
<?php }?>